1. Field of the Invention
The present invention relates to devices, software applications and networks that utilize data that is sent or received over data communication or computer networks. In particular, the present invention is directed to methods and apparatuses for handling the flows of datagrams through a system of network devices. The processor and methods described provide the ability to control the selection of ports of a trunking group is achieve better performance and reduce worst case latency.
2. Description of Related Art
As computer performance has increased in recent years, the demands on computer networks has significantly increased; faster computer processors and higher memory capabilities need networks with high bandwidth capabilities to enable high speed transfer of significant amounts of data. The well-known Ethernet technology, which is based upon numerous IEEE Ethernet standards, is one example of computer networking technology which has been able to be modified and improved to remain a viable computing technology.
Based upon the Open Systems Interconnect (OSI) 7-layer reference model, network capabilities have grown through the development of repeaters, bridges, routers, and, switches, which operate with various types of communication media. Collectively, with respect to the present invention, all of these may be referred to as network devices. Switches, as they relate to computer networking and to Ethernet, are hardware-based devices which control the flow of datagrams, data packets or cells based upon destination address information which is available in each packet. A properly designed and implemented switch should be capable of receiving a packet and switching the packet to an appropriate output port at the maximum speed capability of the particular network.
Referring to the OSI 7-layer reference model discussed previously, the higher layers typically have more information. Various types of products are available for performing switching-related functions at various levels of the OSI model. Hubs or repeaters operate at layer 1, and essentially copy and “broadcast” incoming data to a plurality of spokes of the hub. Layer 2 switching-related devices are typically referred to as multiport bridges, and are capable of bridging two separate networks. Bridges can create a table of forwarding rules based upon which MAC (media access controller) addresses exist on which ports of the bridge, and pass packets that are destined for an address which is located on an opposite side of the bridge. Bridges typically utilize what is known as the “spanning tree” algorithm to eliminate potential data loops; a data loop is a situation wherein a packet endlessly loops in a network looking for a particular address. The spanning tree algorithm defines a protocol for preventing data loops. Layer 3 switches, sometimes referred to as routers, can forward packets based upon the destination network address. Layer 3 switches are capable of learning addresses and maintaining tables thereof which correspond to port mappings. Processing speed for layer 3 switches can be improved by utilizing specialized high performance hardware, and off loading the host CPU so that instruction decisions do not delay packet forwarding.
In addition, the utility of network devices can be increased in certain environments by connecting the network devices into an arrangement where the multiple network devices are utilized like a single device. For example, a network having 14 ports may be arranged with another of the same type of network device to provide a 28 port solution. Another aspect of network devices are often exploited are the ability to “trunk” ports together to form a single logical port. Port trunking is a mechanism to bundle ports together to form what is called a trunk. Port trunking is like a logic link and is used when one requires higher bandwidth and/or redundancy between switches. In some devices, a user can bundle up to 8 ports together to service this purpose.
Since the bundled ports are treated as a logic link, an algorithm is needed to determine which port to send the frame to when there is a frame destined for the trunk group. The basic operation method is whenever a network device processes a frame that is destined for any member of a trunking group, it needs to re-calculate which port of the corresponding trunking group will be used to relay this frame. For example, the process may be employed at the destination address lookup phase for the processing of the frame. The network device may find that a current frame is destined for port A. Also, the network device knows port A is actually part of a trunking group. Then, the network device needs to figure out, based on some calculation process, which member of the corresponding trunking group will be the final destination for this frame. In many environments, this is accomplished by obtaining a trunking hash result. The decision can be any member within the corresponding trunking group.
There are six trunking hash algorithms that are widely used in the industry. They are Source Address (SA) based, Destination Address (DA) based, {SA, DA} based, source Internet Protocol (IP) based, destination IP based and {source IP, destination IP} based scheme. Take SA based trunking hash algorithm as an example, where the network device will use SA as the key to a hash function. Based on the hash result, the network device will do a lookup on the trunking member and then chose one of the trunking members to be the final destination of the corresponding frame. The hash function is deliberately chosen so that it can provide random distribution no matter what input it is fed to. For a different trunking hash algorithm, the difference is occurs in what value is fed to the tunking hash. So, a {SA, DA} based trunking will use {SA, DA} as the key to a hash function, while source IP based trunking will use source IP as the key to a hash function.
In addition, there are some variations on these trunking hash algorithm that are also used. Basically, most of them go deeper into the frame and get more information from higher layer protocol. This is done under the belief that with more information from the frame, the frames can be distributed within a trunking group in a more clever fashion. This is done so that the performance of the whole system can be improved. However, the more complex the scheme, the greater the overhead and eventually a state of diminished returns is reached. What is needed and what is missing from the prior art is a simple method that will allow for greater equity between ports of a trunk group without requiring greater complexity.